﻿namespace Carson.DataAccess.PagePlugin
{
    public class SqlitePagePlugin : IPagePlugin
    {
        public string GetCountString(string preparedSql)
        {
            return string.Format("select count(1) from ({0}) innerq ", preparedSql);
        }

        public string GetLimitString(string preparedSql, int startIndex, int count, string sidx, string sord)
        {
            return string.Format("{0} order by {1} {2} LIMIT {3},{4}", preparedSql, sidx, sord, startIndex, count);
        }
    }
}
